package com.aaa.newpeculiarity8.demo06;

import java.util.function.Consumer;

/**
 * @author C-Q
 * @version 1.1.0
 * @Description: Consumer<T> 消费型函数式接口
 * 隶属Java.util.function包下
 * @date 2022/11/3
 */
public class ConsumerTest {
    /*T:参数的泛型
    void accept(T t);*/
    public static void main(String[] args) {
        Consumer<Double> c=a->{
            System.out.println("正骨需要花费:"+a);
        };
        fan(c,800.0);
    }
    public static void fan(Consumer<Double> consumer,Double money){
        consumer.accept(money);
    }
}
